void TestXrddm(TString txtFile="caf_nodes.txt",TString zipfile="/alice/cern.ch/user/p/proof/xrddmtest.zip", TString rootfile="xrddm_test.root") {
  
  TString rootFileOnly = zipfile;
  rootFileOnly.Remove(rootFileOnly.Last('/'),rootFileOnly.Length());
  rootFileOnly += Form("/%s",rootfile.Data());
  
  ifstream fileIn;
  fileIn.open(Form("%s", txtFile.Data()));
  TFile *f;
  TString file,fname; 
  while (fileIn.good()) {
    fileIn >> file;

    if (file.IsNull()) continue;
    if (file.BeginsWith("#")) continue;
    fname = Form("root://%s/%s#%s",file.Data(),zipfile.Data(),rootfile.Data());
    
    cout << "Testing file " << fname.Data() << flush;
    f = TFile::Open(fname.Data());
    if (f) cout << " OK" << endl;
    else cout << " FAILED" << endl;
    delete f;
    
    fname = Form("root://%s/%s",file.Data(),rootFileOnly.Data());
    cout << "Testing file " << fname.Data() << flush;
    f = TFile::Open(fname.Data());
    if (f) cout << " OK" << endl;
    else cout << " FAILED" << endl;
    delete f;
    
    gSystem->Exec(Form("xrd %s rm %s > /dev/null 2>&1",file.Data(),zipfile.Data()));
    gSystem->Exec(Form("xrd %s rm %s > /dev/null 2>&1",file.Data(),rootFileOnly.Data()));
  }

  fileIn.close();

}
